package com.zh.device.service;

import com.zh.device.service.RedisDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Order(1)
public class RunController implements CommandLineRunner  {

   @Autowired
    private RedisDeviceService redisDeviceService;



    @Override
    public void run(String... strings) throws Exception {

        try{
            redisDeviceService.initDeviceData(null);
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
